When work, such as coating or inspection, is performed on a substrate on which electric or electronic parts are mounted, an operation called “alignment” has to be made before starting a working process. The term “alignment” means an operation of measuring a deviation of the substrate, which is placed on a work table of a working device, from a reference position, and correcting the measured deviation. In order to perform the alignment, it is required to set a feature point serving as a reference, and a position of the feature point. The feature point serving as the reference is usually given as an alignment mark that is formed on a substrate surface. In other cases, a corner of the mounted part or a printed character is also used as the feature point. However, many parts having various shapes different in size and height are mounted on a mounting substrate. Accordingly, when one of the mounted parts is used as an alignment reference, a focus of a camera needs to be adjusted depending on the height of the relevant part.
Adjustment of a focus in a device to perform processing on a mounting substrate is made in many cases by a technique of preparing a mechanism that changes a relative distance between a camera including a single-focus lens and the substrate, and adjusting the focus while gradually changing the relative distance. For example, Patent Document 1 discloses an inspection device comprising image capture means for capturing an image of a mounted state of an electronic part that is mounted on a substrate, drive means for driving the image capture means in a direction toward or away from the electronic part mounted on the substrate, determination means for determining, on the basis of an image signal from the image capture means, whether a focus of the image capture means is aligned with a predetermined position, driving control means for operating the drive means to drive the image capture means in accordance with a determination result of the determination means such that the focus of the image capture means is aligned with the predetermined position, storage means for storing and accumulating a focus position of the image capture means driven by the drive means at a time when the focus of the image capture means is aligned with the predetermined position, and setting means for, when positioning of the focus of the image capture means is repeated, setting a drive range of the image capture means on the basis of the focus positions of the image capture means, which are stored and accumulated in the storage means.
Furthermore, Patent Document 2 discloses a work surface measurement device comprising image capture means for observing a work surface, a stage for changing a relative distance between the image capture means and a work, image capture control means for controlling the image capture means to capture an image plural times during movement of the stage, and control means for discriminating one of the plural images obtained by the image capture control means, the one having a maximum contrast, and determining a work position by employing only the discriminated image.
Several techniques for setting a focus position at the same time as when setting a reference position have been proposed so far. For example, Patent Document 3 discloses a mounted-part inspection device comprising focus adjustment means for adjusting a focus of an image capturing optical system in an image capture device, teaching means for teaching focus information for each of inspection regions of a substrate to be inspected, storage means for storing the focus information, which has been taught from the teaching means, in link with the corresponding inspection region, and control means for, when each inspection region is inspected, operating the focus adjustment means in accordance with the focus information, which is stored in the storage means, such that the focus of the image capturing optical system is automatically adjusted.
Moreover, Patent Document 4 discloses a printed board inspection device comprising a TV camera provided with a zooming mechanism and a focusing mechanism, the TV camera being able to capture images of a printed board at plural magnifications, and means for dividing a surface of the printed board into a plurality of areas for each of the image capture magnifications, and controlling zooming and focusing of the TV camera before capturing images of the areas at each magnification.